import {DIC} from "@/store/dictionary";

export const memberOption = {
  height: 'auto',
  calcHeight: 310,
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  tip: false,
  border: true,
  index: true,
  addBtn: false,
  selection: true,
  indexLabel: "序号",
  column: [
    {
      label: "姓名",
      prop: "realName",
      search: true,
      rules: [{
        required: true,
        message: "请输入真实姓名",
        trigger: "blur"
      }]
    },
    {
      label: "性别",
      prop: "sex",
      type: "select",
      search: true,
      dicData: DIC.sex
    },
    {
      label: "加入时间",
      prop: "joinTime",
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
    },
  ]
}

export const attendanceOption = {
  height: 'auto',
  calcHeight: 410,
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  tip: false,
  border: true,
  index: true,
  addBtn: false,
  viewBtn: true,
  selection: true,
  indexLabel: "序号",
  column: [
    {
      label: "考勤名称",
      prop: "name",
      search: true,
      rules: [{
        required: true,
        message: "请输入考勤名称",
        trigger: "blur"
      }]
    },
    // {
    //   label: "考勤时间",
    //   prop: "attendanceTime",
    //   rules: [{
    //     required: true,
    //     message: "请输入考勤时间",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "备注",
      prop: "remark"
    },
    // {
    //   label: "创建人",
    //   prop: "createUser",
    //   rules: [{
    //     required: true,
    //     message: "请输入创建人",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "创建时间",
      prop: "createTime",
      addDisplay: false,
      rules: [{
        required: true,
        message: "请输入创建时间",
        trigger: "blur"
      }]
    },
    // {
    //   label: "修改人",
    //   prop: "updateUser",
    //   rules: [{
    //     required: true,
    //     message: "请输入修改人",
    //     trigger: "blur"
    //   }]
    // },
    // {
    //   label: "修改时间",
    //   prop: "updateTime",
    //   rules: [{
    //     required: true,
    //     message: "请输入修改时间",
    //     trigger: "blur"
    //   }]
    // }
  ]
}

export const homeworkOption = {
  height: 'auto',
  calcHeight: 350,
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  tip: false,
  border: true,
  index: true,
  addBtn: false,
  viewBtn: true,
  selection: true,
  indexLabel: "序号",
  column: [
    {
      label: "作业名称",
      prop: "name",
      rules: [{
        required: true,
        message: "请输入作业名称",
        trigger: "blur"
      }]
    },
    {
      label: "开始时间",
      prop: "beginTime",
      rules: [{
        required: true,
        message: "请输入开始时间",
        trigger: "blur"
      }]
    },
    {
      label: "结束时间",
      prop: "endTime",
      rules: [{
        required: true,
        message: "请输入结束时间",
        trigger: "blur"
      }]
    },
    // {
    //   label: "创建人",
    //   prop: "createUser",
    //   rules: [{
    //     required: true,
    //     message: "请输入创建人",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "创建时间",
      prop: "createTime",
      rules: [{
        required: true,
        message: "请输入创建时间",
        trigger: "blur"
      }]
    },
    // {
    //   label: "修改人",
    //   prop: "updateUser",
    //   rules: [{
    //     required: true,
    //     message: "请输入修改人",
    //     trigger: "blur"
    //   }]
    // },
    // {
    //   label: "修改时间",
    //   prop: "updateTime",
    //   rules: [{
    //     required: true,
    //     message: "请输入修改时间",
    //     trigger: "blur"
    //   }]
    // },
    {
      label: "状态",
      prop: "status",
      type: "select",
      dicData: DIC.homeworkStatus,
      rules: [{
        required: true,
        message: "请输入状态",
        trigger: "blur"
      }]
    }
  ]
}

export const gradesOption = {
  height: 'auto',
  calcHeight: 210,
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  tip: false,
  border: true,
  index: true,
  addBtn: false,
  viewBtn: true,
  selection: true,
  indexLabel: "序号",
  column: [
  ]
}

export const scoreOption = {
  searchShow: true,
  searchMenuSpan: 6,
  align: "center",
  tip: false,
  border: true,
  index: true,
  menu: false,
  addBtn: false,
  selection: true,
  indexLabel: "序号",
  column: [
    {
      label: "姓名",
      prop: "realName",
      search: true,
      rules: [{
        required: true,
        message: "请输入真实姓名",
        trigger: "blur"
      }]
    },
    {
      label: "性别",
      prop: "sex",
      type: "select",
      search: true,
      dicData: DIC.sex
    },
    {
      label: "成绩",
      prop: "score",
      type: "number",
      minRows: 0,
      maxRows: 100,
      precision: 1,
      cell: true,
    }
  ]
}
